*Table 3: Gender Gaps: Heterogeneity by GPA Score*
clear all
use Clean_data, clear

*********************************T3.GENDERGP_HETEROG.****************

reg dropout i.year i.female##c.inv_competNOQUOTA c.z_GPA##i.female  c.z_GPA#c.inv_competNOQUOTA i.female#c.z_GPA#c.inv_competNOQUOTA if degree=="M" & foreign==0 & GPA!=., robust


global z_test_ z_answered z_test_correct 

foreach x in $z_test_ {
reg `x'  i.year i.female##c.inv_competNOQUOTA c.z_GPA##i.female  c.z_GPA#c.inv_competNOQUOTA i.female#c.z_GPA#c.inv_competNOQUOTA if degree=="M" & foreign==0 & GPA!=. & test==1 & (year<1987 | year>1988) ,robust 
}

global z_notest_ z_test_points z_total_points position

foreach x in $z_notest_ {
reg `x' i.year i.female##c.inv_competNOQUOTA c.z_GPA##i.female  c.z_GPA#c.inv_competNOQUOTA i.female#c.z_GPA#c.inv_competNOQUOTA if degree=="M" & foreign==0 & GPA!=. & test==1  ,robust 
}
